using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Elvex;

public class MessageBoxController : MonoBehaviour
{
    MessageBoxModel m_model;
    MessageBoxBaseView m_view;

    private void Awake()
    {
        m_model = gameObject.GetComponent<MessageBoxModel>();
        m_view = gameObject.GetComponent<MessageBoxBaseView>();

        m_view.OnButtonClicked.AddListener(m_model.Click);
    }

    // Start is called before the first frame update
    void Start()
    {
        m_view.Show(m_model.Title, m_model.Context, m_model.Buttons);
    }
}
